#! /usr/bin/env python3
# -*- coding: utf-8 -*-

import time
print('使用for循环实现的结果如下：')

for i in range(1, 10):
    for j in range(1, i+1):
        print("%d*%d=%d" % (j, i, i*j), end='\t')
    print()


print("使用while循环实现的结果如下：")

i = 1
while i < 10:
    j = 1
    while j < i+1:
        result = i * j
        print(f"{j}*{i}={result}", end="\t")
        time.sleep(0.1)
        j += 1
    print()
    i += 1

